cmake_minimum_required (VERSION 2.6)

project (Spelling_Corrector)

SET(CMAKE_BUILD_TYPE distribution)

SET(CMAKE_CXX_FLAGS_DISTRIBUTION "-O3")

add_executable(TextMiningApp
  src/TextMiningApp.cpp
  src/TextMiningApp.hh
  src/optimized_trie.hh
  src/optimized_trie.cc)

add_executable(TextMiningCompiler
  src/TextMiningCompiler.cpp
  src/TextMiningCompiler.hh
  src/optimized_trie.hh
  src/optimized_trie.cc
  src/Trie.hh
  src/Trie.cc)

# doc rule

find_package (Doxygen)

if (DOXYGEN_FOUND)
  add_custom_target (doc ${DOXYGEN_EXECUTABLE} doc/Doxyfile)
endif (DOXYGEN_FOUND)

# test rule

add_custom_target (check cd test &&  ./moulinette.py)

# tar rule

add_custom_target (tar git archive master --prefix=textmining_lobry_levi/ --output=textmining_lobry_levi.tar.gz)
